package my.kwantlen.assignment2;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.view.View;
import android.view.View.OnClickListener;





public class Main extends Activity {
	private Button settingButton;
	private Button connectButton;
	private Button aboutButton;
	
	public void onCreate(Bundle savedInstanceState) {
    	super.onCreate(savedInstanceState);
    	setContentView(R.layout.actualmain);
    	
    	final AlertDialog ad = new AlertDialog.Builder(this).create();  
	  	  ad.setCancelable(false); // This blocks the 'BACK' button  
	  	  ad.setMessage("SlothFTP Client by: Kevin Hubbard, Geoff Onusko and Matt Miller");
	
	  	  ad.setButton("OK", new DialogInterface.OnClickListener() {  
	  	      public void onClick(DialogInterface dialog, int which) {  
	  	          dialog.dismiss();                      
	  	      }  
	  	  });  
	  	  
  	  this.settingButton = (Button)this.findViewById(R.id.setting);
  	  this.settingButton.setOnClickListener(new OnClickListener() {
  	    public void onClick(View v) {
  	    		Intent i = new Intent();
              i.setClassName("my.kwantlen.assignment2", "my.kwantlen.assignment2.settings");
              startActivity(i);
  	    }
  	  }); 
  	    	  
  	  this.connectButton = (Button)this.findViewById(R.id.connect);
  	  this.connectButton.setOnClickListener(new OnClickListener() {
  	    public void onClick(View v) {
  	    	Intent i = new Intent();
            i.setClassName("my.kwantlen.assignment2", "my.kwantlen.assignment2.Assignment2finalActivity");
            startActivity(i);
  	    }
  	  });  	  
  	  
  	  this.aboutButton = (Button)this.findViewById(R.id.about);
  	  this.aboutButton.setOnClickListener(new OnClickListener() {
  	    public void onClick(View v) {
  	    	ad.show();
  	    }  
  	  });
  	  
	}
}
